-
Notifications
You must be signed in to change notification settings - Fork 32
✨ task manager web-api listing (🗃️) #7544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ task manager web-api listing (🗃️) #7544
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7544 +/- ##
==========================================
- Coverage 87.62% 87.48% -0.15%
==========================================
Files 1752 1696 -56
Lines 67864 66384 -1480
Branches 1121 1024 -97
==========================================
- Hits 59467 58074 -1393
+ Misses 8089 8023 -66
+ Partials 308 287 -21
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new endpoints and repository methods to list the latest iterations of computations and tasks, and adjusts the RPC and RabbitMQ setups to support these features.
- Added web routes for listing the latest computation iterations and tasks.
- Renamed repository methods from list to list_ and introduced new query methods for filtering user computations.
- Updated tests and RPC interfaces to reflect the new endpoints and repository changes.
Reviewed Changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| services/web/server/src/simcore_service_webserver/director_v2/_computations_rest.py | New endpoints for listing latest computation iterations and tasks. |
| services/director-v2/tests/unit/with_dbs/comp_scheduler/test_db_repositories_comp_runs.py | Updated tests to use the renamed repository method list_. |
| services/director-v2/tests/unit/with_dbs/comp_scheduler/test_api_rpc_computations.py | New tests for RPC endpoints for computations. |
| services/director-v2/tests/conftest.py | Updated test fixtures to include rpc_client and patch RPC routes. |
| services/director-v2/src/simcore_service_director_v2/modules/rabbitmq.py | Adjusted RabbitMQ client names and added rpc_server initialization/teardown. |
| services/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_tasks/_core.py | Added new method to list computational tasks for frontend clients with pagination and ordering. |
| services/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_runs.py | Renamed list method to list_ and added a new method for listing only latest iterations. |
| services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_manager.py | Updated scheduling to use the new list_ repository method. |
| services/director-v2/src/simcore_service_director_v2/core/application.py | Integrated RPC API routes setup into app initialization. |
| API and RPC routes files | Added new routes and dependencies for computations RPC. |
| Models-library changes | Updated schemas to support the new computations endpoints. |
Files not reviewed (1)
- services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml: Language not supported
Comments suppressed due to low confidence (1)
services/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_runs.py:210
- The function 'desc' is undefined in this scope; please replace it with 'sa.desc' to ensure the ordering works correctly with SQLAlchemy.
desc(getattr(comp_runs.c, order_by.field)), comp_runs.c.run_id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 30 out of 31 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml: Language not supported
Comments suppressed due to low confidence (1)
services/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_runs.py:191
- The function 'literal_column' is used without a proper namespace. Please either import it explicitly from 'sqlalchemy' or use 'sa.literal_column' to ensure the reference is correct.
comp_runs.c.iteration == literal_column("latest_runs.latest_iteration"),
...ices/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_tasks/_core.py
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_runs.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
packages/models-library/src/models_library/api_schemas_webserver/computations.py
Outdated
Show resolved
Hide resolved
packages/models-library/src/models_library/api_schemas_webserver/computations.py
Outdated
Show resolved
Hide resolved
packages/models-library/src/models_library/api_schemas_webserver/computations.py
Outdated
Show resolved
Hide resolved
...eb/server/src/simcore_service_webserver/director_v2/_controller/_computations_rest_schema.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/director_v2/_controller/computations_rest.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/director_v2/_controller/computations_rest.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool! a few things that we can discuss tomorrow!
services/director-v2/src/simcore_service_director_v2/api/rpc/_computations.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/api/rpc/_computations.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/api/rpc/_computations.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_runs.py
Show resolved
Hide resolved
...ices/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_tasks/_core.py
Outdated
Show resolved
Hide resolved
...ices/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_tasks/_core.py
Show resolved
Hide resolved
...ices/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_tasks/_core.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK with me
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the checks and changes!



What do these changes do?
This PR introduces new webserver endpoints:
/computations/-/iterations/latest/computations/{{project_id}}/iterations/latest/tasksto list the latest iterations of computations and tasks, and adjusts the RPC and RabbitMQ setups in Director-v2 to support these features.
Related issue/s
How to test
Dev-ops
NOne